package cn.sinata.wanglin.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.ArrayList;

import cn.sinata.wanglin.mine.fragment.MessagesFragment;
import cn.sinata.wanglin.model.SameCityClass;
import cn.sinata.wanglin.village.fragment.SameCityListFragment;

/**
 * description：
 * Created by kaihongwu on 2016/12/13 下午 3:32
 */
public class MessageCenterPagerAdapter extends FragmentStatePagerAdapter {
    private  ArrayList<String> mdatas ;
    public MessageCenterPagerAdapter(FragmentManager fm, ArrayList<String> mdatas) {
        super(fm);
        this.mdatas=mdatas;
    }

    @Override
    public Fragment getItem(int position) {
        return MessagesFragment.newInstance(position);
    }

    @Override
    public int getCount() {
        return mdatas.size();
    }
    @Override
    public CharSequence getPageTitle(int position) {
        return mdatas.get(position);
    }


}
